package opreation;

import book.Book;
import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:此类显示书籍操作
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2024-01-03  09:07
 */
public class ShowOpreation implements IOpreation{
    @Override
    public void work(BookList bookList) {
        System.out.println("书架上的书籍如下：");
        int currentSize = bookList.getUsedSize();
        for(int i = 0; i < currentSize; i++) {
            Book book = bookList.getBook(i);
            System.out.println(book);
        }
    }
}
